#import <UIKit/UIKit.h>
// PageControl的高度、标点的宽、高
#define kPageControlHeight 6
// PageControl标点间距
#define kPageControlMargin 5
//完全不透明白色
#define kPageControlColorWhiteA [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0]
//半透明白色
#define kPageControlColorWhiteH [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:0.5]

#if __has_include(<Commom/SEGText.h>)
#import <Commom/SEGText.h>
#else
#import "SEGText.h"
#endif

typedef NS_ENUM(NSUInteger, SEGPageControlLayoutType) {
    SEGPageControlLayoutType_NO = 0, /*首页*/
    SEGPageControlLayoutType_Find = 1, /*发现*/
    SEGPageControlLayoutType_Small = 2, /*集市*/
    SEGPageControlLayoutType_Topic = 3, /*话题（帮帮广告位）*/
    SEGPageControlLayoutType_Sign = 4, /*签到*/
    SEGPageControlLayoutType_ACT = 5,  /*活动*/
    SEGPageControlLayoutType_House = 6  /*房屋租售首页*/
};


@protocol protocolPageControlDelegate <NSObject>
@optional
@end

@interface SEGPageControlModel : NSObject
@property (nonatomic, assign) NSInteger numberOfPages; // 总页数
@property (nonatomic, assign) NSInteger currentPage; // 当前页数
@property (nonatomic, assign) SEGPageControlLayoutType type;

@end

@interface SEGPageControlLayout : NSObject
@property (nonatomic, assign) CGFloat totalHeight;//控件总高度
@property (nonatomic, assign) CGFloat totalWidth;//控件总高度
@property (nonatomic, strong)SEGPageControlModel *data;
- (instancetype)initWithData:(SEGPageControlModel *)data;
-(void)segPageControlLayout;
+ (CGFloat)getPageWidthWithType:(SEGPageControlLayoutType)type;

@end

@interface SEGPageControl : UIView
@property (nonatomic, strong)SEGPageControlLayout *layout;
- (void)setWithLayout:(SEGPageControlLayout *)layout;

@property (nonatomic, strong) UIScrollView *backScrollView; // 展示页点

@property (nonatomic, assign) id<protocolPageControlDelegate> delegate;// 代理

/**
 * 设置当前展示的页面坐标
 * @author Sam
 */
-(void)setCurrentPage:(NSInteger)currentIndex;
@end

